<?php

namespace Modules\User\Entities;

use Modules\User\Entities\UserModel;

class User extends UserModel
{
    protected $fillable = ['nickname', 'avatar', 'gender', 'city', 'province', 'country'];
    protected $guarded = ["id"];

    protected $casts = [
        'current_delivery_id' => 'integer',
    ];

    public function user() 
    {
        return $this;
    }

    public function addresses()
    {
        return $this->hasMany(Address::class);
    }

    public function wechat()
    {
        return $this->hasOne(UserWechat::class);
    }
}

